package org.dromara.netbar.domain.bo;

import org.dromara.netbar.domain.NetbarMemberBalanceLog;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

/**
 * 余额流水表业务对象 netbar_member_balance_log
 *
 * @author Lion Li
 * @date 2025-07-26
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = NetbarMemberBalanceLog.class, reverseConvertGenerate = false)
public class NetbarMemberBalanceLogBo extends BaseEntity {

    /**
     * 主键ID
     */
    @NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
    private Long memberBalanceId;

    /**
     * 会员ID
     */
    @NotNull(message = "会员ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long memberId;

    /**
     * 变动金额，分为单位，正数增加，负数减少
     */
    private Long amount;

    /**
     * 操作前余额，分为单位
     */
    private Long balanceBefore;

    /**
     * 操作后余额，分为单位
     */
    private Long balanceAfter;

    /**
     * 1充值 2消费 3退款
     */
    private Long businessType;

    /**
     * 1基本余额 2奖励余额
     */
    private Long balanceType;


}
